package com.zxt.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class RandomUtil {
    //生成激活码
    public static String createActiveCode(){
        Random random=new Random();
        return getTime()+Integer.toHexString(random.nextInt(9999999));
    }
    public static String getTime(){
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        return  sdf.format(new Date());
    }

    public static String createOrderId(){
        return getTime()+new Random().nextInt(99999999);
    }
}
